package main

import (
	"fmt"
	"gorpc/client"
	"gorpc/transport"
)

//// CalcArgs 请求参数结构体
//type CalcArgs struct {
//	A int `json:"a"`
//	B int `json:"b"`
//}
//
//// CalcReply 响应结构体
//type CalcReply struct {
//	result int `json:"sum"`
//}

func main() {
	tcpTransport := transport.NewTCPTransport("localhost:8080", 10, nil)
	calcService := client.NewCalcServiceProxy(tcpTransport)

	sum, err := calcService.Add(3, 5)
	if err != nil {
		fmt.Println("Error:", err)
	} else {
		fmt.Println("Result:", sum)
	}
}
